package cn.edu.zzuli.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@ApiModel("订单实体")
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("offer_order")
public class OfferOrder {

    @ApiModelProperty("订单编号")
    @TableId(value = "oid", type = IdType.AUTO)
    private Integer oid;

    @ApiModelProperty("用户编号")
    private Integer ouid;

    @ApiModelProperty("订单标题")
    private String title;

    @ApiModelProperty("订单类型")
    private String type;

    @ApiModelProperty("出发地点")
    private String sendPlace;

    @ApiModelProperty("取货地点")
    private String pickPlace;

    @ApiModelProperty("需求描述")
    private String described;

    @ApiModelProperty("赏金")
    private Double bounty;

    @ApiModelProperty("截止时间")
    private String deadTime;

    @ApiModelProperty("发布时间")
    private String postTime;

    @ApiModelProperty("订单状态")
    private Integer status;

    @ApiModelProperty("逻辑删除")
    @TableField(exist = false)
    //@TableLogic
    private Integer deleted;

    @ApiModelProperty("退款")
    private Integer refund;

    //@Version
    private Integer version;

    public OfferOrder(Integer id, Integer status){
        this.oid = id;
        this.status = status;
    }

}
